home *** CD-ROM | disk | FTP | other *** search
/ Ray Dream Studio / Ray Dream Studio (CDRAYD1) (Ray Dream) (1995).iso / DREAMSDK.WIN / INCLUDE / I3DSHETR.H < prev    next >
C/C++ Source or Header  |  1995-09-11  |  6KB  |  135 lines

  1. /* $Id: i3Dshetr.h 1.2 1995/09/11 01:11:06 YannPC Exp $ */
  2. /*****************************************************************************\
  3. *                                                                             *
  4. * I3DShEtr.h                                                                                *
  5. *   I3DShCrossSection definition                                              *
  6. *   I3DShExtrusion definition                                                 *
  7. *                                                                             *
  8. *           Copyright (c) 1995, Ray Dream, Inc. All rights reserved.          *
  9. *                                                                             *
  10. \*****************************************************************************/
  11.  
  12. #ifndef __I3DSHETR__
  13. #define __I3DSHETR__
  14.  
  15. #ifndef __I3DSHOBJ__
  16. #include "I3DShObj.h"
  17. #endif
  18.  
  19. struct ExtrusionPB;
  20. struct ExtrusionAutoPB;
  21.  
  22. //****** Globally Unique Ids **************************************************
  23.  
  24. DEFINE_GUID(IID_I3DShCrossSection, 0xB4E12D20L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
  25. DEFINE_GUID(IID_I3DShExtrusion, 0xB6D730C0L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
  26.  
  27. //-- The following classes are available in Ray Dream Designer 3:
  28. DEFINE_GUID(CLSID_StandardCrossSection, 0xB8A40180L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
  29. DEFINE_GUID(CLSID_StandardExtrusion, 0xBC03A740L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
  30.  
  31.  
  32. /*****************************************************************************\
  33. *  I3DShCrossSection                                                          *
  34. *                                                                             *
  35. *    I3DShCrossSection defines the cross-sections an Extrusion is made of.    *
  36. *                                                                             *
  37. *        Pseudo "grammar" for building 2D curves:
  38. *        FLATSURFACE =
  39. *            BeginFlatSurface
  40. *            GROUP
  41. *            EndFlatSurface
  42. *        
  43. *        GROUP = 
  44. *            BeginGroup
  45. *            GROUP | COMPOUND | PATH                1 or more times
  46. *            EndGroup
  47. *        
  48. *        COMPOUND = 
  49. *            BeginCmpnd
  50. *            GROUP | COMPOUND | PATH                1 or more times
  51. *            EndCmpnd
  52. *        
  53. *        PATH =
  54. *            BeginPath
  55. *            LineTo | BezierTo                            1 or more times
  56. *            EndPath
  57. *                                                                             *
  58. \*****************************************************************************/
  59.  
  60. #undef  INTERFACE
  61. #define INTERFACE   I3DShCrossSection
  62.  
  63. DECLARE_INTERFACE_(I3DShCrossSection, IUnknown) {
  64.     // IUnknown methods
  65.   STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  66.   STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  67.   STDMETHOD_(ULONG, Release) (THIS) PURE;
  68.  
  69.     // I3DShCrossSection methods
  70.     STDMETHOD_(I3DShCrossSection*, Clone) (THIS) PURE;
  71.     //-- Geometry building calls (see grammar above)
  72.     STDMETHOD(BeginSection) (THIS) PURE;                // Call this before building the section
  73.     STDMETHOD(EndSection) (THIS) PURE;                    // And this before when you are done
  74.     STDMETHOD(BeginGroup) (THIS) PURE;
  75.     STDMETHOD(EndGroup) (THIS) PURE;
  76.     STDMETHOD(BeginCmpnd) (THIS) PURE;                    // Use compounds to make holes
  77.     STDMETHOD(EndCmpnd) (THIS) PURE;
  78.     STDMETHOD(BeginPath) (THIS_ VECTOR2D* firstPoint) PURE;
  79.     STDMETHOD(LineTo) (THIS_ VECTOR2D* secondPoint) PURE;
  80.     STDMETHOD(BezierTo) (THIS_ VECTOR2D* secondPoint, VECTOR2D* thirdPoint, VECTOR2D* fourthPoint) PURE;
  81.     STDMETHOD(EndPath) (THIS) PURE;
  82.     //-- Utils.
  83.     STDMETHOD(Move) (THIS_ VECTOR2D* delta) PURE;
  84.     STDMETHOD(Transform) (THIS_ VECTOR2D* ti, VECTOR2D* tj, VECTOR2D* tt) PURE;
  85.     STDMETHOD(GetBBox) (THIS_ BOX2D* bbox) PURE;
  86.     };
  87.  
  88. /*****************************************************************************\
  89. *  I3DShExtrusion                                                             *
  90. *                                                                             *
  91. *    I3DShExtrusion is a generalized extrusion made out of multiple cross-    *
  92. *    sections.                                                                *
  93. *                                                                             *
  94. \*****************************************************************************/
  95.  
  96. #undef  INTERFACE
  97. #define INTERFACE   I3DShExtrusion
  98.  
  99. DECLARE_INTERFACE_(I3DShExtrusion, I3DShObject) {
  100.     // IUnknown methods
  101.   STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  102.   STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  103.   STDMETHOD_(ULONG, Release) (THIS) PURE;
  104.  
  105.     // I3DShObject methods
  106.     //-- Naming
  107.     STDMETHOD(SetName) (THIS_ char* name) PURE;
  108.     STDMETHOD(GetName) (THIS_ char* name) PURE;
  109.     //-- Geometry calls
  110.     STDMETHOD_(BOOLEAN, IsPatchBased) (THIS) PURE;
  111.     STDMETHOD(EnumPatches) (THIS_ EnumPatchesCallback callback, void* privData) PURE;
  112.     STDMETHOD(EnumFacets) (THIS_ EnumFacetsCallback callback, void* privData, NUM3D fidelity) PURE;
  113.     //-- Shading calls
  114.     STDMETHOD(SetSimpleShading) (THIS_ COLOR3D* color, NUM3D specularIntensity, NUM3D specularIndex, NUM3D reflection, NUM3D transparency) PURE;
  115.     STDMETHOD(SetPrimerShader) (THIS_ I3DShShader* name) PURE;
  116.     STDMETHOD_(ULONG, GetUVSpaceCount) (THIS) PURE;
  117.     STDMETHOD(GetUVSpace) (THIS_ ULONG uvSpaceID, UVSpaceInfo* uvSpaceInfo) PURE;
  118.     STDMETHOD(AddShadingShape) (THIS_ ShadingShape* shadingShape, ULONG uvSpaceID) PURE;
  119.  
  120.     // I3DShExtrusion methods
  121.     //-- Geometry building
  122.     STDMETHOD(StartBuilding) (THIS_ BOOLEAN pipeline, BOOLEAN useEnvelopes, short envelopesFlags) PURE;
  123.     STDMETHOD(AddCrossSection) (THIS_ ExtrusionPB* pb) PURE;
  124.     STDMETHOD(AddAutoCrossSection) (THIS_ ExtrusionAutoPB* pb) PURE;
  125.     STDMETHOD(EndBuilding) (THIS) PURE;
  126.     //-- Misc.
  127.     STDMETHOD(CenterData) (THIS) PURE;            // To do after EndBuilding(). Center data using regular bbox
  128.     STDMETHOD(CenterFacetData) (THIS) PURE;    // To do after EndBuilding(). Center data using facets bbox. SLOW.
  129.     };
  130.  
  131.  
  132.  
  133. #endif
  134.  
  135.